// #sijapp cond.if modules_ACTIVITYUI is "true"#
package jimm.ui.notify;

import javax.microedition.lcdui.Image;
import javax.microedition.midlet.MIDlet;

import com.sonyericsson.ui.UIActivityMenu;
import com.sonyericsson.ui.UIEventListener;
import jimm.Jimm;

/**
 *
 * @author Rad1st
 */
public class SeActivity implements UIEventListener, ActivityUI {

    private UIActivityMenu _ui;

    public SeActivity() {
    }

    public SeActivity init(MIDlet midlet) {
        try {
            _ui = UIActivityMenu.getInstance(midlet);
            _ui.setEventListener(this);
            return this;
        } catch (Exception e) {
            return null;
        }
    }

    /**
     * Handles callbacks when the user selects the event from the list in the Activity Menu
     */
    public void eventAction(int eventId) {
        //Handle the event...
        Jimm.setMinimized(false);
    }

    /**
     * Pushes a new event to the Activity Menu
     */
    public void addEvent(String title, String desc, Image icon) {
        _ui.addEvent(title, desc, icon, null);
    }
}
// #sijapp cond.end#

